home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Apr 89 / T0015-DisposIfHandle Bug-Apr89 < prev    next >
Encoding:
Text File  |  1989-04-13  |  1.0 KB  |  34 lines  |  [TEXT/GEOL]

  1. Item    3210562                         12-April-89        16:35
  2.  
  3. From:   REDDEN                          Peat Marwick, Kevin Redden
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     REDDEN                          Peat Marwick, Kevin Redden
  8.  
  9. Sub:    DisposIfHandle Bug
  10.  
  11. We seem to have found a problem with the new version ( ß9 ) of DisposIfHandle.
  12. If a handle is created ( and set to be purgeable ) and is later purged then a
  13. call to DisposIfHandle on that handle will fail ( in Debug only ).
  14.  
  15. Sample Code to force the failure:
  16.  
  17. tempHandle := NewHandle ( 1024 );
  18. HPurge ( tempHandle );
  19. PurgeMem ( Size ( 5000 ) * Size ( 1024 ) ); { Make real sure handle is purged }
  20. DisposIfHandle ( tempHandle );
  21.  
  22. this will cause DisposIfHandle to relay the message
  23. "Trying to dispose an invalid handle"
  24. (then writes out the address of the handle )
  25. and trace breaks
  26.  
  27. It seems as if RecoverHandle will not work if the handle has been purged.
  28.  
  29. Please let me know if I was assuming something that I shouldn't be assuming!
  30.  
  31.  
  32. Kevin Redden
  33.  
  34.